<template>
  <el-container style="padding: 0;height: 100%;">
    <el-header style="padding: 0">
      <div class="top">
        <div style="padding-top: 15px;">
          <h3>特色乡村后台管理</h3>
        </div>
      </div>
    </el-header>
    <el-main style="padding: 10px 0 0 0">
      <el-container>
        <el-aside width="240px">
          <leftnav></leftnav>
        </el-aside>
        <el-container>
          <el-header style="padding: 0 0 0 10px">
            <TopNav></TopNav>
            </el-header>
          <el-main style="padding: 10px 0 0 10px">
            <router-view></router-view>
          </el-main>
        </el-container>
      </el-container>
    </el-main>
  </el-container>

</template>
<script>
// 导入组件
import leftnav from '@/components/LeftNav.vue'
import TopNav from "@/components/TopNav.vue";
import Cookies from "js-cookie";
import ok from "@/assets/ok";
export default {
  name: 'ManageIndex',
  data() {
    return {
      showclass: 'asideshow',
      showtype: false
    }
  },
  // 注册组件
  components: {
    TopNav,
    leftnav
  },
  methods: {
    checkLogin(){
      if (!ok.tool.getStatus()){
        this.$router.push("/login")
      }
    },
  },
  mounted() {
    this.checkLogin();
  }
}
</script>
<style >
html,body,#app,.el-container{
  padding: 0;
  margin: 0;
  height: 100%;
}
.el-aside{
  width: 240px;
  text-align: center;
}
.top{
  background-color: #1f2d3d;
  width: 100%;
  height: 100%;
  color: white;
}
</style>
